if (!this.getItem('frmMain').getForm().isValid()) {
    return;
}

var parms = this.getItem('frmMain').getValues();

var me = this;
button.disable();
YX.ZbusRpc.request({
    module: 'SmfrCreateProductSerialService',
    params: parms,
    showFail: false,
    showSuccess: false,
    callback: function() {
        button.enable();
        me.getItem('txtPsn').reset();
        me.getItem('dspPsn').setValue(parms.psn);
    },
    success: function(rsp) {
        me.getItem('dspResult').setValue(rsp.rspDesc);
        me.getItem('txtPsn').addCls(['bold', 'black']);
        me.getItem('txtPsn').removeCls(['bold', 'red']);
    },
    failure: function(rsp) {
        var msg = rsp.rspDesc;
        if (msg.length > 50) {
            msg = msg.substr(0, 100) + "..";
        }
        me.getItem('dspResult').setValue(msg);
        me.getItem('txtPsn').removeCls(['bold', 'black']);
        me.getItem('txtPsn').addCls(['bold', 'red']);
    }
});